<template>
	<view>
		<view class="wallet-box">
			<view class="wallet-cell" @click.stop="payMethodChange(0)">
				<image class="icon" src="https://oss.jxhecong.com/v2/image/wallet@2x.png"></image>
				<view class="wallet-name">账户余额<text style="color: #909399;font-size:24rpx;">（余额:{{balance}}）</text></view>
				<image class="select" :src="pay==0?'https://oss.jxhecong.com/v2/image/xuanze-active.png':'https://oss.jxhecong.com/v2/image/xuanze.png'"></image>
			</view>
			<view class="line"></view>
			<!-- <view class="wallet-cell" @click.stop="payMethodChange(1)">
				<image class="icon" src="../../static/images/wallet_wx@2x.png"></image>
				<view class="wallet-name">微信支付</view>
				<image class="select" :src="payMethod==1?'../../static/images/xuanze-active.png':'../../static/images/xuanze.png'"></image>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			balance:{
				type: String,
				default:''
			}
		},
		data(){
			return{
				pay:"0"
			}
		},
		methods:{
			payMethodChange(method){
				this.$emit('payMethodChange',{method:method})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wallet-box{
		background: #FFFFFF;
		box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.06);
		border-radius: 9px;
		.wallet-cell{
			display: flex;
			justify-content: space-between;
			align-items: center;
			height:102rpx;
			padding:0rpx 30rpx;
			.icon{
				width:42rpx;
				height:42rpx;
			}
			.wallet-name{
				color:#303133;
				font-size:32rpx;
				flex:1;
				margin-left:24rpx;
			}
			.select{
				width:36rpx;
				height:36rpx;
			}
		}
	}
	.line{
		background-color:#F3F4F6;
		height:1rpx;
	}
</style>
